package com.albaba.designpattern.observer.text_001;

/**
 * @Description: TODO
 * @Author zx
 * @Date 2025/2/24 15:34
 * @Version 1.0
 */
public class Client {

    public static void main(String[] args) {
        // 创建目标类
        Subject subject = new ConcreteSubject();

        // 注册观察者
        subject.attach(new ConcreteObserver1());
        subject.attach(new ConcreteObserver2());

        // 具体的主题内部发生改变，给所有注册的观察者发送通知
        subject.notifyObservers();
    }
}
